package observerPattern.ringEvent;

import observerPattern.ringEvent.listener.StudentEventListener;
import observerPattern.ringEvent.listener.TeacherEventListener;

/**
 * @author： pang-yun
 * @date： 2021-10-26 11:38
 * 功能目的 ：用于
 */

public class Client {
    public static void main(String[] args) {
        BellEventSource bellEventSource = new BellEventSource();
        bellEventSource.addListener(new TeacherEventListener());
        bellEventSource.addListener(new StudentEventListener());

        bellEventSource.ring(true);

        System.out.println("----------------------");

        bellEventSource.ring(false);

    }
}
